#include "idewindow.h"
#include "projectexplorer.h"
#include "centralwidget.h"
#include <QDockWidget>
#include <QMenuBar>

#ifdef _DEBUG
#pragma comment(lib, "CodeEditor_D.lib")
#pragma comment(lib, "ProjectManager_D.lib")
#pragma comment(lib, "WidgetBase_D.lib")
#else
#pragma comment(lib, "CodeEditor.lib")
#pragma comment(lib, "ProjectManager.lib")
#pragma comment(lib, "WidgetBase.lib")
#endif

IDEWindow::IDEWindow(QWidget *parent, Qt::WFlags flags)
	: QMainWindow(parent, flags)
{
	m_pCentralWidget = new CentralWidget(this);
	setCentralWidget(m_pCentralWidget);
}

IDEWindow::~IDEWindow()
{

}

void IDEWindow::createItems()
{
	createProjectExplorer();
	createMenuBar();
}

void IDEWindow::createProjectExplorer()
{
	m_pProjectExplorer = new ProjectExplorer(this);
	m_pExplorerDock = new QDockWidget(tr("Project Explorer"), this);
	m_pExplorerDock->setWidget(m_pProjectExplorer);

	m_pExplorerDock->setFeatures(QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetFloatable);

	addDockWidget(Qt::LeftDockWidgetArea, m_pExplorerDock);
}

void IDEWindow::createMenuBar()
{
	m_pMenuBar = new QMenuBar(this);

	setMenuBar(m_pMenuBar);
}

